package com.originskyseed.platform.course.service;

import java.util.List;
import java.util.Map;

import com.originskyseed.platform.core.base.BasePage;
import com.originskyseed.platform.course.model.CourseRelateIsRead;

/**
 * 课程关联人员是否查看表Service接口类（OSI_COURSE_RELATE_IS_READ）
 *
 * @author wlj
 */
public interface ICourseRelateIsReadService {

	/**
	 * 删除记录
	 *
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public int deleteByPrimaryKey(String id) throws Exception;

	/**
	 * 批量删除记录
	 *
	 * @param ids
	 * @return
	 * @throws Exception
	 */
	public int deleteByPrimaryKeys(List<String> ids) throws Exception;

	/**
	 * 插入记录
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int insert(CourseRelateIsRead record) throws Exception;

	/**
	 * 插入记录（仅非空值字段）
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int insertSelective(CourseRelateIsRead record) throws Exception;

	/**
	 * 批量新增
	 *
	 * @param list
	 * @return
	 * @throws Exception
	 */
	public int insertBatch(List<CourseRelateIsRead> list) throws Exception;

	/**
	 * 更新记录
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int updateByPrimaryKey(CourseRelateIsRead record) throws Exception;

	/**
	 * 更新记录（仅非空值字段）
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int updateByPrimaryKeySelective(CourseRelateIsRead record) throws Exception;

	/**
	 * 修改已读
	 *
	 * @param courseId
	 * @param objId
	 * @return
	 * @throws Exception
	 */
	public int updateIsRead(String courseId, String objId) throws Exception;

	/**
	 * 查询是否已读
	 * @param courseId
	 * @param objId
	 * @return
	 * @throws Exception
	 */
	public Integer selectIsRead(String courseId, String objId) throws Exception;

	/**
	 * 查询记录
	 *
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public CourseRelateIsRead selectByPrimaryKey(String id) throws Exception;

	/**
	 * 查询列表
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public List<CourseRelateIsRead> selectList(CourseRelateIsRead record) throws Exception;

	/**
	 * 分页查询列表
	 *
	 * @param params
	 * @param page
	 * @return
	 * @throws Exception
	 */
	public BasePage<CourseRelateIsRead> selectListByPage(Map<String, Object> params, BasePage<CourseRelateIsRead> page) throws Exception;

	/**
	 * 统计未读
	 *
	 * @param objId
	 * @return
	 * @throws Exception
	 */
	public Integer countIsReadNum(String objId) throws Exception;

}
